<?php

/**
 * @author Mahabub Alam
 * @copyright 2012
 */

class User extends CI_Controller {
    function __construct() 
    {
        parent::__construct();
    }
    
    public function user_list()
    {
        $this->load->model('user_model');
        $res = $this->user_model->get_user_list();
        
        if($res != false)
        {
            //$dlist = array();            
            foreach($res as $row)
            {
                $dlist[] = $row;
            }        
            $data['main_content'] = 'user_view';
            $data['userlist'] = $dlist;
            $this->load->view('include/template', $data);       
        }   
    } 
    
    public function delete_user($user_to_delete = false)
    {
        echo 'delete user of id'. $user_to_delete;
    }
    
    public function update_user($user_to_update = false)
    {
        echo 'edit user of id '. $user_to_update;
    }


}